<nz-layout class="page-root">
  <div style="width: 100%">
    <div class="filter-box">
      <nz-range-picker [(ngModel)]="dates" class="date-pickers" nzShowTime="true"></nz-range-picker>
      <div class="search">
        <input [(ngModel)]="racerIdNo" nz-input placeholder="身份证号搜索" type="text"/>
      </div>
      <div class="search">
        <input [(ngModel)]="racerName" nz-input placeholder="姓名搜索" type="text"/>
      </div>
      <button (click)="queryDataInit()" class="btn" nz-button nzType="primary">搜索</button>
      <button (click)="export()" [nzLoading]="exportHttpConfig.showLoading" class="btn" nz-button nzType="dashed">导出
      </button>
    </div>
    <div class="content">
      <nz-table #basicTable
                (nzPageIndexChange)="queryData()"
                (nzPageSizeChange)="queryData()"
                [(nzPageIndex)]="pageIndex"
                [(nzPageSize)]="pageSize"
                [nzData]="dataList"
                [nzFrontPagination]="false"
                [nzLoading]="defaultHttpConfig.showLoading"
                [nzPageSizeOptions]="[10,50,100,200]"
                [nzShowPagination]="true"
                [nzShowSizeChanger]="true"
                [nzTotal]="pageTotal"
                nzBordered>
        <thead>
        <tr>
          <th>序号</th>
          <th>参赛类别</th>
          <th>姓名</th>
          <th>性别</th>
          <th>身份证号码</th>
          <th>组别</th>
          <th>作品名称</th>
          <th>联系人</th>
          <th>联系方式</th>
          <th>所在学校/机构</th>
          <th>指导教师</th>
          <th>指导教师联系方式</th>
          <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <tr *ngFor="let data of basicTable.data">
          <td>{{ data.activityRegisterId }}</td>
          <td>{{ data.actType }}</td>
          <td>{{ data.racerName }}</td>
          <td>{{ data.gender }}</td>
          <td>{{ data.racerIdNo }}</td>
          <td>{{ data.actGroup }}</td>
          <td>{{ data.workName }}</td>
          <td>{{ data.linker }}</td>
          <td>{{ data.linkerMobile }}</td>
          <td>{{ data.school }}</td>
          <td>{{ data.teacher }}</td>
          <td>{{ data.teacherMobile }}</td>
          <td>
            <button (click)="downloadWork(data.workFile)" nz-button nzType="link">下载作品</button>
          </td>
        </tr>
        </tbody>
      </nz-table>
    </div>
  </div>
</nz-layout>

